package com.woniu.cms.goods.core.controller;


import com.woniu.cms.goods.core.service.IGoodsReturnMaterialService;
import com.woniu.cms.goods.core.service.IGoodsReturnService;
import com.woniu.common.api.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 退料单附属材料表，退料单材料详情页所显示的信息 前端控制器
 * </p>
 *
 * @author romantic sheep
 * @since 2022-09-19
 */
@Api(tags = "退料单材料明细")
@RestController
@RequestMapping("/goods-return-material")
public class GoodsReturnMaterialController {

    @Autowired
    private IGoodsReturnMaterialService returnMaterialService;
    @Autowired
    private IGoodsReturnService returnService;
    /*
     * 查询所有退料材料
     * @currentPage，当前页码
     * @pageSize，页面大小
     * @status，退料单状态
     * */
    @GetMapping("list")
    @ApiOperation("分页查询/按状态查询")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentPage",value = "当前页码"),
            @ApiImplicitParam(name = "pageSize",value = "页面大小"),
            @ApiImplicitParam(name = "status",value = "退料单状态")
    })
    public Result getList(Integer currentPage, Integer pageSize, Integer status){
       Result result = returnMaterialService.getList(currentPage,pageSize,status);
       return result;
    }

}

